package com.hj.surface;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MotionEvent;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	@Override
	public boolean dispatchTouchEvent(MotionEvent ev) {
		if(ev.getAction()==MotionEvent.ACTION_DOWN){
			System.out.println("ACTION_DOWN");
		}else if(ev.getAction()==MotionEvent.ACTION_MOVE){
			System.out.println("ACTION_MOVE");
		}else if(ev.getAction()==MotionEvent.ACTION_UP){
			System.out.println("ACTION_UP");
		}
		
		return super.dispatchTouchEvent(ev);
	}

}
